#include"processbar.h"

typedef void (*Function)(double total, double current);


void Download(Function func)
{
  double current = 0.0f;
  double total = 1024.0f;
  double speed = 2.0f;
  while(current <= total)
   {
       current += speed;
       func(total,current);
      // printf("\n %.2lf",current);
   }
}


int main()
{
  // // process_v1();
  // double current = 0.0f;
  // double total = 1024.0f;
  // double speed = 1.0f;
  // while(current <= total)
  // {
  //     current += speed;
  //     process_v2(total,current);
  //    // printf("\n %.2lf",current);
  // }
   Download(process_v2);
   printf("\n Finished \n");
   printf("hello world");
   printf("hello world");
   printf("hello world");
   printf("hello world");
   printf("hello world");
   return 0;
}
